package com.coder.shop.dao.model;

import java.io.Serializable;
import java.util.List;

public class ShopGoodsType implements Serializable {
    private Integer id;

    /**
     * name
     *
     * @mbg.generated
     */
    private String name;

    /**
     * 父分类
     *
     * @mbg.generated
     */
    private Integer pId;

    /**
     * 页面标题
     *
     * @mbg.generated
     */
    private String pageTitle;

    /**
     * 页面关键词
     *
     * @mbg.generated
     */
    private String pageKewords;

    /**
     * 页面描述
     *
     * @mbg.generated
     */
    private String pageDescripte;

    /**
     * 排序
     *
     * @mbg.generated
     */
    private Integer sort;

    /**
     * 访问路径
     *
     * @mbg.generated
     */
    private String path;

    /**
     * 图片
     *
     * @mbg.generated
     */
    private String picture;
    
    private List<ShopSpec> shopSpecList;
    
    private List<ShopGoodsType> children;

    private static final long serialVersionUID = 1L;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getpId() {
        return pId;
    }

    public void setpId(Integer pId) {
        this.pId = pId;
    }

    public String getPageTitle() {
        return pageTitle;
    }

    public void setPageTitle(String pageTitle) {
        this.pageTitle = pageTitle;
    }

    public String getPageKewords() {
        return pageKewords;
    }

    public void setPageKewords(String pageKewords) {
        this.pageKewords = pageKewords;
    }

    public String getPageDescripte() {
        return pageDescripte;
    }

    public void setPageDescripte(String pageDescripte) {
        this.pageDescripte = pageDescripte;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public String getPicture() {
        return picture;
    }

    public void setPicture(String picture) {
        this.picture = picture;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", name=").append(name);
        sb.append(", pId=").append(pId);
        sb.append(", pageTitle=").append(pageTitle);
        sb.append(", pageKewords=").append(pageKewords);
        sb.append(", pageDescripte=").append(pageDescripte);
        sb.append(", sort=").append(sort);
        sb.append(", path=").append(path);
        sb.append(", picture=").append(picture);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ShopGoodsType other = (ShopGoodsType) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getpId() == null ? other.getpId() == null : this.getpId().equals(other.getpId()))
            && (this.getPageTitle() == null ? other.getPageTitle() == null : this.getPageTitle().equals(other.getPageTitle()))
            && (this.getPageKewords() == null ? other.getPageKewords() == null : this.getPageKewords().equals(other.getPageKewords()))
            && (this.getPageDescripte() == null ? other.getPageDescripte() == null : this.getPageDescripte().equals(other.getPageDescripte()))
            && (this.getSort() == null ? other.getSort() == null : this.getSort().equals(other.getSort()))
            && (this.getPath() == null ? other.getPath() == null : this.getPath().equals(other.getPath()))
            && (this.getPicture() == null ? other.getPicture() == null : this.getPicture().equals(other.getPicture()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getpId() == null) ? 0 : getpId().hashCode());
        result = prime * result + ((getPageTitle() == null) ? 0 : getPageTitle().hashCode());
        result = prime * result + ((getPageKewords() == null) ? 0 : getPageKewords().hashCode());
        result = prime * result + ((getPageDescripte() == null) ? 0 : getPageDescripte().hashCode());
        result = prime * result + ((getSort() == null) ? 0 : getSort().hashCode());
        result = prime * result + ((getPath() == null) ? 0 : getPath().hashCode());
        result = prime * result + ((getPicture() == null) ? 0 : getPicture().hashCode());
        return result;
    }

	public List<ShopGoodsType> getChildren() {
		return children;
	}

	public void setChildren(List<ShopGoodsType> children) {
		this.children = children;
	}

	public List<ShopSpec> getShopSpecList() {
		return shopSpecList;
	}

	public void setShopSpecList(List<ShopSpec> shopSpecList) {
		this.shopSpecList = shopSpecList;
	}

}